package rpcKids;

import rpcKids.server.common.RPCServer;
import rpcKids.server.entity.ExpRequest;
import rpcKids.server.handler.ExpRequestHandler;
import rpcKids.server.handler.FibRequestHandler;

/**
 * @author tonywang
 * @date 7/27/2018
 */
public class DemoServer {

    public static void main(String[] args) {
        RPCServer server = new RPCServer("localhost", 8888, 2, 16);
        server.service("fib", Integer.class, new FibRequestHandler())
                .service("exp", ExpRequest.class, new ExpRequestHandler());
        server.start();
    }

}